<%@page import="com.gss.common.util.ApplicationConstants"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@include file="../common.jsp" %>

<script type="text/javascript">
	$(document).ready(function(){
		/* enableDatepicker('docValidityStartDate','dd-mm-yy');
		enableDatepicker('docValidityEndDate','dd-mm-yy');
		enableDisableFields('docRenewableSelect'); */
	});
</script>

<tr>
	<td class="spacingColumnWidthLess"></td>
	<td class="formLabel"><label>Validity Condition</label></td>
	<td class="spacingColumnWidthLess"></td>
	<td class="formField">
		<form:hidden path="renewable"  />
		<form:select path="renewable" disabled="true" id="docRenewableSelect" >
			<form:option value="true">Limited</form:option>
			<form:option value="false" >Lifetime</form:option>			
	</form:select>
	</td>
	<td class="spacingColumnWidthMedium"></td>
</tr>

<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>
<tr>
	<td class="spacingColumnWidthLess"></td>
	<td class="formLabel"><label>Validity Start Date</label></td>
	<td class="spacingColumnWidthLess"></td>
	<td class="formField">
		<form:input path="docValidityStartDate" readonly="true"/> 
	</td>
	<td class="spacingColumnWidthMedium"></td>
	<td class="formLabel"><label>Validity End Date</label></td>
	<td class="spacingColumnWidthLess"></td>
	<td class="formField">
		<form:input path="docValidityEndDate" cssClass="disableInputField" readonly="true"/> 
	</td>
	<td class="spacingColumnWidthLess"></td>									
</tr>
<tr>
		<td class="spacingColumnWidthLess"></td>
		<td class="formLabel"></td>
		<td class="spacingColumnWidthLess"></td>
		<td class="formError">
			<form:errors path="docValidityStartDate" cssClass="errorMsg"></form:errors>
		</td>
		<td class="spacingColumnWidthMedium"></td>
		<td class="formLabel"></td>
		<td class="spacingColumnWidthLess"></td>
		<td class="formError">
			 <form:errors path="docValidityEndDate" cssClass="text errorMsg"></form:errors> 
		</td>
		<td class="spacingColumnWidthLess"></td>
	</tr>
<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>
<tr>
	<td class="spacingColumnWidthLess"></td>
	<td class="formLabel"><label>Escalation Periods:</label></td>
	<td class="spacingColumnWidthLess"></td>
</tr>
<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>
<tr class="formBlockColor">
	<td class="spacingColumnWidthLess"></td>
	<td class="formLabel"></td>
	<td colspan="6">
		<table style="width: 80%;">
			<tr align="center">
				<td class="formLabel"><label>First</label></td>
				<td class="spacingColumnWidthLess"></td>
				<td>
					<form:input path="firstEscalationPeriod"  cssClass="numtext disableInputField" readonly="true"/>
				</td>
				<td class="spacingColumnWidthMedium"></td>
				<td class="formLabel"><label>Second</label></td>
				<td class="spacingColumnWidthLess"></td>
				<td>
					<form:input path="secondEscalationPeriod"  cssClass="numtext disableInputField" readonly="true"/> 
				</td>
				<td class="spacingColumnWidthMedium"></td>
				<td class="formLabel"><label>Third</label></td>
				<td class="spacingColumnWidthLess"></td>
				<td >
					<form:input path="thirdEscalationPeriod"  cssClass="numtext disableInputField" readonly="true"/>  
				</td>
			</tr>
			<tr align="center">
				<td class="formLabel"></td>
				<td class="spacingColumnWidthLess"></td>
				<td class="formError">
					<form:errors path="firstEscalationPeriod" cssClass="text errorMsg"></form:errors>
				</td>
				<td class="spacingColumnWidthMedium"></td>
				<td class="formLabel"></td>
				<td class="spacingColumnWidthLess"></td>
				<td class="formError">
					<form:errors path="secondEscalationPeriod" cssClass="text errorMsg"></form:errors>
				</td>
				<td class="spacingColumnWidthMedium"></td>
				<td class="formLabel"></td>
				<td class="spacingColumnWidthLess"></td>
				<td class="formError" >
					<form:errors path="thirdEscalationPeriod" cssClass="text errorMsg"></form:errors> 
				</td>
			</tr>
		</table>
	</td>
	<td class="spacingColumnWidthLess"></td>
</tr>
<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>

<%-- 
	<tr>
		<td>
			<label>Document Validity Condition</label>
		</td>
		<td class="spacingColumn"></td>
		<td>
			<form:input path="validity" readonly="true"></form:input>
		</td>
	</tr>
	<tr>
		<td><label>Validity Start Date</label> </td>
		<td class="spacingColumn"></td>
		<td>
			<fmt:formatDate value="${renewalDetailsForm.docValidityStartDate}" pattern="<%=com.gss.common.util.ApplicationConstants.DEFAULT_DATE_PATTERN%>"/> 
		</td>
		<td class="spacingColumn"></td>
		<td><label>Validity End Date</label> </td>
		<td class="spacingColumn"></td>	
		<td>
			<fmt:formatDate value="${renewalDetailsForm.docValidityEndDate}" pattern="<%=com.gss.common.util.ApplicationConstants.DEFAULT_DATE_PATTERN%>"/>
		</td>
	</tr>
	<tr class="spacingRow"><td></td> </tr>
	<tr>
		<td><label>Escalation Periods:</label> </td>
	</tr>
	<tr>
		<td><label>First</label> </td>
		<td class="spacingColumn"></td>
		<td>
			<form:input path="firstEscalationPeriod"  readonly="true" cssClass="text ui-widget-content ui-corner-all numtext disableInputField"/> 
		</td>
		<td class="spacingColumn"></td>
		<td><label>Second</label> </td>
		<td class="spacingColumn"></td>	
		<td>
			<form:input path="secondEscalationPeriod"  readonly="true" cssClass="text ui-widget-content ui-corner-all numtext disableInputField"/> 
		</td>
		<td class="spacingColumn"></td>
		<td><label>Third</label> </td>
		<td class="spacingColumn"></td>
		<td>
			<form:input path="thirdEscalationPeriod"  readonly="true" cssClass="text ui-widget-content ui-corner-all numtext disableInputField"/> 
		</td>
	</tr>
	<tr class="spacingRow"><td></td> </tr>
	<tr>	
		<td>
			<a target="_blank" href="downloadAttachment/${renewalDetailsForm.docId}.htm"><input type="button" value="View Upload Doc"></a>
		</td> 
	</tr>
 --%>